package com.ruoyi.basicsystem.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysMenu;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 客户协议价管理对象 zn_agreement
 * 
 * @author nexiaozi
 * @date 2022-03-25
 */
public class ZnAgreement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 协议标题 */
    @Excel(name = "协议标题")
    private String title;

    /** 客户id */
    @Excel(name = "客户id")
    private Long customerId;

    /** 生效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "生效时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date effectTime;

    /** 失效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "失效时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date invalidTime;

    /** 是否默认 1是 0  否  该字段目前暂未使用 */
    @Excel(name = "是否默认 1是 0  否")
    private String isDefault;

    /** 状态 0 未启用  1已启用 2已生效  -1已过期 */
    @Excel(name = "状态 0 未启用  1已启用 2已生效")
    private String status;

    /** 新增人员名称 */
    @Excel(name = "新增人员名称")
    private String createName;

    /** 修改人员名称 */
    @Excel(name = "修改人员名称")
    private String updateName;

    /** 租户id */
    @Excel(name = "租户id")
    private Long tenantId;

    /** 删除标记，0未删除，1删除 */
    @Excel(name = "删除标记，0未删除，1删除")
    private String deleteFlag;
    /** pid */
    private Long parentId;

    private BigDecimal saleRatio;

    /** 协议商品详情信息 */
    private List<ZnAgreementDetail> znAgreementDetailList =new ArrayList<>();

    /** 用户 */
    private List<ZnAgreement> children = new ArrayList<ZnAgreement>();

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setCustomerId(Long customerId) 
    {
        this.customerId = customerId;
    }

    public Long getCustomerId() 
    {
        return customerId;
    }
    public void setEffectTime(Date effectTime) 
    {
        this.effectTime = effectTime;
    }

    public Date getEffectTime() 
    {
        return effectTime;
    }
    public void setIsDefault(String isDefault) 
    {
        this.isDefault = isDefault;
    }

    public String getIsDefault() 
    {
        return isDefault;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setCreateName(String createName) 
    {
        this.createName = createName;
    }

    public String getCreateName() 
    {
        return createName;
    }
    public void setUpdateName(String updateName) 
    {
        this.updateName = updateName;
    }

    public String getUpdateName() 
    {
        return updateName;
    }
    public void setTenantId(Long tenantId) 
    {
        this.tenantId = tenantId;
    }

    public Long getTenantId() 
    {
        return tenantId;
    }
    public void setDeleteFlag(String deleteFlag) 
    {
        this.deleteFlag = deleteFlag;
    }

    public String getDeleteFlag() 
    {
        return deleteFlag;
    }

    public List<ZnAgreementDetail> getZnAgreementDetailList()
    {
        return znAgreementDetailList;
    }

    public void setZnAgreementDetailList(List<ZnAgreementDetail> znAgreementDetailList)
    {
        this.znAgreementDetailList = znAgreementDetailList;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public BigDecimal getSaleRatio() {
        return saleRatio;
    }

    public void setSaleRatio(BigDecimal saleRatio) {
        this.saleRatio = saleRatio;
    }

    public List<ZnAgreement> getChildren() {
        return children;
    }

    public void setChildren(List<ZnAgreement> children) {
        this.children = children;
    }

    public Date getInvalidTime() {
        return invalidTime;
    }

    public void setInvalidTime(Date invalidTime) {
        this.invalidTime = invalidTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("parentId", getParentId())
            .append("title", getTitle())
            .append("customerId", getCustomerId())
            .append("effectTime", getEffectTime())
            .append("invalidTime", getInvalidTime())
            .append("isDefault", getIsDefault())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("createName", getCreateName())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("updateName", getUpdateName())
            .append("tenantId", getTenantId())
            .append("deleteFlag", getDeleteFlag())
            .append("parentId", getParentId())
            .append("saleRatio", getSaleRatio())
            .append("znAgreementDetailList", getZnAgreementDetailList())
            .toString();
    }
}
